const importAllRoutes = (r) => {
  let routes = [];
  r.keys().forEach((v) => {
    if (v.startsWith('./index')) {
      // 排除当前index.js
      return;
    }
    routes = [...routes, ...r(v).default];
  });
  return routes;
};

export default [
  {
    path: '/conf',
    name: 'conf',
    component: (resolve) => require(['../../views/conf'], resolve),
    children: importAllRoutes(require.context('./', true, /\.js$/)),
    meta: {
      name: 'pageTitle.adminSystem', // 网页标题
      //requiresAuth: true
    },
  },
];
